package schema

import (
	"entgo.io/ent"
	"entgo.io/ent/schema/field"
	"time"
)

// RelationshipStat holds the schema definition for the RelationshipStat entity.
type RelationshipStat struct {
	ent.Schema
}

// Fields of the RelationshipStat.
func (RelationshipStat) Fields() []ent.Field {
	return []ent.Field{
		field.Time("together_since").
			Comment("在一起日期"),
		field.Time("first_meet_date").
			Optional().
			Nillable().
			Comment("第一次见面日期"),
		field.Int32("meet_count").
			Default(0).
			Comment("见面次数"),
		field.Time("created_at").
			Default(time.Now).
			Immutable().
			Comment("创建时间"),
		field.Time("updated_at").
			Default(time.Now).
			UpdateDefault(time.Now).
			Comment("更新时间"),
	}
}

// Edges of the RelationshipStat.
func (RelationshipStat) Edges() []ent.Edge {
	return nil
}
